package com.gitee.cashzhang27.test.cloud.seata.user.controller;

import com.gitee.cashzhang27.test.cloud.seata.user.service.AccountService;
import java.math.BigDecimal;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Description：
 *
 * @author fangliangsheng
 * @date 2017/12/25
 */
@RestController
@AllArgsConstructor
public class AccountController {

  private AccountService accountService;

  @RequestMapping("/debit")
  public Boolean debit(String userId, BigDecimal money) {
    accountService.debit(userId, money);

    return true;
  }
}
